<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">

<head th:replace="index::head">

</head>

<body>
    <ul class="layui-nav" th:replace="index::nav">
    </ul>

    <div>
        <div style="text-align: center;background-color: #4191C2;color: white;height: 150px;">
            <h1 style="padding: 50px">出勤统计</h1>
        </div>
    </div>

    <div class="layui-container">
        <!-- <div class="layui-card">
            <div class="layui-card-body">
                <div class="layui-row">
                    <form action="/attendance/list" method="get">
                        <div class="layui-col-xs4">
                            <div class="layui-input-block">
                                <input type="text" name="keyword" value=""   placeholder="请输入员工ID"
                                    autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-col-xs2">
                            <button type="submit" class="layui-btn layui-btn-success">查询</button>
                        </div>
                    </form>
                </div>
            </div>
        </div> -->

        <div class="layui-row">
            <div class="layui-col-xs12">
                <h3>近7天打卡统计</h3>
                <table class="layui-table" lay-even lay-skin="line" lay-size="lg">
                    <colgroup>
                        <col width="150">
                        <col>
                    </colgroup>
                    <thead>
                        <tr>
                            <th>员工编号</th>
                            <th>打卡次数</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr th:each="u:${countVos}">
                            <td th:text="${u.userId}">木子</td>
                            <td th:text="${u.punchCount}">1</td>
                        </tr>
                    </tbody>
                </table>
                <hr>
                <h3>考勤统计</h3>
                <table class="layui-table" lay-even lay-skin="line" lay-size="lg">
                    <colgroup>
                        <col width="150">
                        <col>
                    </colgroup>
                    <thead>
                        <tr>
                            <th>员工名字</th>
                            <th>月份</th>
                            <th>出勤天数</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr th:each="u:${attendanceVos}">
                            <td th:text="${u.name}">木子</td>
                            <td th:text="${u.month}">1</td>
                            <td th:text="${u.days}">66666</td>
                        </tr>
                    </tbody>
                </table>
            </div>

        </div>

    </div>
</body>
<script>



    function update(id) {
        window.location.href = "/salary/edit/" + id
    }

    function del(id) {
        $.get('/salary/remove/' + id, function (data) {
            if (data.code === 200) {
                layer.msg('删除成功！');
                setTimeout(() => {
                    window.location.reload();
                }, 1200);
            }
        })
    }
</script>

</html>